****************************************************************************
* File-Nale: 		chicago2006_sk.do
* Date:		 04/30/2018
* Author: 		Fred Batista
* Purpose: 		individual level analyses of knowledge
* Data used: 		chicago2006_sk.dta
* Data Output:	Journal of Politics� paper	*/
****************************************************************************

*Gender- SQ2
*Age- SQ3
*Interest in Australia international relations - Q1
*Knowledge - Q600 Q605
*Income - S3
*Education - S2
* Subjectve class - S10
*Employment Status - S1
*Weight - WT

* Recodes

gen man = 2 - SQ2

gen woman = 1 - man

gen age = SQ3

gen age_sq = age*age

gen interest = Q1

recode interest (4=.) (1=2) (2=1) (3=0)

gen income = S3

recode income (99=.)

gen subwealth = 5 - S10

recode subwealth (-4=.)

gen education = S2

recode education (9=.)

gen housewife = S1

recode housewife (6=1) (else=0)

gen weight = WT

* knowledge items

gen euro = Q600

recode euro (1=1) (else=0)

gen annan = Q605

recode annan (1=1) (else=0)

gen euro2 = Q600

recode euro2 (1=2) (2=1) (3=0)  (4 5=.)

gen annan2 = Q605

recode annan2 (1=2) (2 3 4 5 6 7 8 9 10 11 12 13 14=1) (99=0)


* ANALYSES

***item analyses

* discrimination

alpha euro annan

* difficulty

summarize euro annan [aweight=weight]

*** Models

* Euro

khb probit euro man || income subwealth education age age_sq interest housewife [pweight=weight]

probit euro man income subwealth education age age_sq interest housewife [pweight=weight]

mlogit euro2 woman income subwealth education age age_sq interest housewife [pweight=weight], base(2)

* Koffi Annan

khb probit annan man || income subwealth education age age_sq interest housewife [pweight=weight]

probit annan man income subwealth education age age_sq interest housewife [pweight=weight]

mlogit annan2 woman income subwealth education age age_sq interest housewife [pweight=weight], base(2)
